home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
dev
/
amos
/
termplay.lha
/
TermPlay.AMOS
/
TermPlay.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1997-09-04
|
18KB
|
704 lines
' Playing with the Serial Port
' by Don Chamberlain
Set Buffer 200
'Set up the resource bank and the resource screen...
Resource Bank 16
Resource Screen Open 0,640,200,0
Screen Display 0,,43,,
Flash Off : Curs Off : Cls 0 : Paper 0
Palette $666,$F00,$4A4,$DD0,$C,$370,$900,$CCC
Dim PHONE$(64),ST$(30),RECORD$(2)
BLANK$=Chr$(159)
'Load the config file and the phonebook...
E=Exist("term.config")
If E=True
Open In 1,"term.config"
For S=2 To 12
Input #1,ST$(S)
Next S
Close 1
Else
FCONFIG$=Fsel$("*.config","Term.config","Load a Configuration File")
Open In 1,FCONFIG$
For S=2 To 12
Input #1,ST$(S)
Next S
Close 1
End If
E=Exist("phonebook.data")
If E=True
Open In 1,"phonebook.data"
For S=0 To 64
Input #1,PHONE$(S)
Next S
Close 1
F$="Phonebook.data"
Else
F$=Fsel$("*.data","Load a Data File","Must end in .data")
Open In 1,F$
For S=0 To 64
Input #1,PHONE$(S)
Next S
Close 1
End If
XSEND=0 : XREC=1 : XOPEN=2 : XCLOSE=3
XSETUP=4 : XREAD=5 : XWRITE=6 : XCUSTOM=7
_STRINGS
BBS$="by Latenight Software Experiments Ltd."
INIT_HDR
Global A$,B$,C$,F$,ST$(),BBS$,FCONFIG$,SET$,_FILE$,LHDR$
Global XSEND,XREC,XOPEN,XCLOSE,XSETUP,XREAD,XWRITE,XCUSTOM
Every 60 Proc DA_TIME : Every On
'Open the serial port and send a command to check it...
MSP=Val(ST$(2))
Extension_11_0006 MSP,8,1,8096,250000,$80,0,"serial.device"
Extension_11_0064 "ATZ"+Chr$(13)
' Open the Main Loop...>
STRT:
Scroll On
Do
Gosub DA_MENUS
RD$= Extension_11_0044 : Print Extension_10_0472(RD$); : RD$=""
ID$= Extension_11_00DA : Extension_11_0034 ID$ : ID$=""
Loop
End
'Subroutines...
_SAVEIT:
Dialog Close(1)
F$=Fsel$("*.data","","Save the PhoneBook")
If F$="" : Dialog Open 1,A$ : Return : End If
Locate ,12 : Centre "Saving a PhoneBook..."
Open Out 1,F$
For O=0 To 64
Print #1,PHONE$(O)
Next O
Close 1
Locate ,12 : Centre " "
Home
Dialog Open 1,A$
Return
_LOADIT:
Dialog Close(1)
F$=Fsel$("*.data","","Load a PhoneBook")
If F$="" : Dialog Open 1,A$ : Return : End If
Locate ,12 : Centre "Loading a PhoneBook..."
Open In 1,F$
For O=0 To 64
Input #1,PHONE$(O)
Next O
Close 1
Locate ,12 : Centre " "
Home
Dialog Open 1,A$
Return
SOORT:
Dialog Close(1)
Sort PHONE$(0)
Dialog Open 1,A$
Return
DELETE:
NN=Vdialog(1,4)
Dialog Close(1)
PHONE$(NN)=BLANK$+Space$(39)
Dialog Open 1,A$
Return
EDDIT:
NUM=Vdialog(1,4)
RECORD$(1)=Left$(Rdialog$(1,4),20)
RECORD$(2)=Right$(Rdialog$(1,4),20)
Dialog Close(1)
Dialog Open 2,C$
Vdialog$(2,4)=RECORD$(1)
Vdialog$(2,5)=RECORD$(2)
X=Dialog Run(2)
N$=Rdialog$(2,1)
P$=Rdialog$(2,2)
Dialog Close(2)
If Len(N$)<20
NAME$=N$+Space$(20-Len(N$))
End If
FIRST$=Left$(NAME$,1)
SECOND$=Right$(NAME$,19)
THIRD$=Upper$(FIRST$)
NAME$=THIRD$+SECOND$
PHON$=P$+Space$(20-Len(P$))
REC$=NAME$+PHON$
PHONE$(NUM)=REC$
Dialog Open 1,A$
Return
' Dial the phone number...
DIAL:
M$=Right$(Rdialog$(1,4),20)
BBS$=Left$(Rdialog$(1,4),20)
While Right$(BBS$,2)=" "
BBS$=BBS$-" "
Wend
If Left$(M$,1)=" " : Goto STRT : End If
T$="ATDT "
T$=T$+M$+Chr$(13)
Dialog Close
Curs On
Extension_11_0034 T$
Do
Q= Extension_11_0054
If Q>0 : Exit 1 : End If
Loop
Return
PHONEBOOK:
Dialog Open 1,A$
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
X=Dialog Run(1)
Do
D=Dialog(1)
If D=5 : Gosub DIAL : Exit 1 : End If
If D=6
Gosub SOORT
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
J=Dialog Run(1)
End If
If D=7
Gosub DELETE
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
J=Dialog Run(1)
End If
If D=8
Gosub EDDIT
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
J=Dialog Run(1)
End If
If D=9 Then Dialog Close : Return
If D=10
Gosub _SAVEIT
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
J=Dialog Run(1)
End If
If D=11
Gosub _LOADIT
Vdialog(1,0)=Array(PHONE$(0))
Vdialog$(1,3)=F$
J=Dialog Run(1)
End If
Loop
Goto STRT
Return
CONFIG:
Dialog Open 2,B$,40,4096
For Q=2 To 12
Vdialog$(2,Q+11)=ST$(Q)
Next Q
X=Dialog Run(2)
B1=Rdialog(2,24) : Rem cancel button
B2=Rdialog(2,25) : Rem load "
B3=Rdialog(2,26) : Rem save "
B4=Rdialog(2,27) : Rem use "
If B1>0 Then Dialog Close : Goto STRT
For Q=2 To 12
ST$(Q)=Rdialog$(2,Q+11)
Next Q
If B2 or B3>0
Dialog Close
Gosub _LOADCONFIG
Goto CONFIG
End If
Dialog Close
Return
CANCEL:
Extension_11_0024
T$= Extension_11_00C8("","","",3)
Dialog Close
Edit
End
DA_MENUS:
Ink 2,7,
Menu$(1)=" System "
Menu$(1,1)=" Quit "
Menu$(2)="Transfer "
Menu$(2,1)="Download "
Menu$(2,2)="Upload "
Menu$(3)="Phone "
Menu$(3,1)="Phone Book"
Menu$(3,2)="Hang Up "
Menu$(4)="Terminal"
Menu$(4,1)="Configuration"
Menu$(4,2)="Clear Screen "
On Menu Gosub MENU1,MENU2,MENU3,MENU4
Menu On : On Menu On
Return
MENU1:
If Choice(2)=1
Goto CANCEL
End If
Return
MENU2:
If Choice(2)=1 : _DOWNLOAD : Every Off : End If
If Choice(2)=2 : _UPLOAD : Every Off : End If
Menu On : On Menu On
Return
MENU3:
If Choice(2)=1 : Gosub PHONEBOOK : End If
If Choice(2)=2
Extension_11_0034 "+++"
Wait Vbl
End If
Menu On : On Menu On
Return
MENU4:
If Choice(2)=1 : Gosub CONFIG : End If
If Choice(2)=2 : Cls 0 : Home : End If
Menu On : On Menu On
Return
_LOADCONFIG:
FCC$=Fsel$("*.config","","Load a Configuration")
If FCC$="" : Goto STRT : End If
Locate ,12 : Centre "Loading a Configuration..."
Open In 1,FCC$
For S=2 To 12
Input #1,ST$(S)
Next S
Close 1
Locate ,12 : Centre " "
Return
_SAVECONFIG:
FSC$=Fsel$("*.config","","Save the Configuration")
If FSC$="" : Goto STRT : End If
Locate ,12 : Centre "Saving a Configuration..."
Open Out 1,FSC$
For S=2 To 12
Print #1,ST$(S)
Next S
Close 1
Locate ,12 : Centre " "
Return
Procedure INIT_HDR
Screen Open 1,640,8,8,Hires : Curs Off : Cls 6
Screen Display 1,,243,, : Screen 1 : Pen 2 : Paper 6
Locate 2,0 : Print "TermPlay";
Locate 2,0 : Centre BBS$
Screen 0
End Proc
Procedure DA_TIME
BT$= Extension_10_02C4 : TL$=Mid$(BT$,1,2)
BT$= Extension_10_02C4 : TM$=Mid$(BT$,3,2)
BT$= Extension_10_02C4 : TR$=Mid$(BT$,5,2)
AP$="AM"
TMP=Val(TL$)
If TMP=0 : TL$="12" : AP$="AM" : End If
If TMP>12 : TMP=TMP-12 : TL$=Str$(TMP) : AP$="PM" : End If
TIME$=TL$+":"+TM$+" "+AP$
Screen 1 : Paper 6
Locate 0,0 : Print Chr$(26)
Pen 5 : Locate 2,0 : Print "TermPlay";
Pen 2 : Locate 0,0 : Centre BBS$
Pen 5 : Locate 70,0 : Print TIME$;
Screen 0 : Every On
End Proc
Procedure XPR_PRINT
Print LHDR$
Print L1$-"%s"-"%ld"
Print L3$-"%s"-"%ld"
Print L4$-"%s"-"%ld"
Print L5$-"%s"-"%ld"
Print L6$-"%s"-"%ld"
Print L8$-"%s"-"%ld"
Print L9$-"%s"-"%ld"
Print L10$-"%s"-"%ld"
Print L11$-"%s"-"%ld"
Print L12$-"%s"-"%ld"
Print L13$-"%s"-"%ld"
Print L14$-"%s"-"%ld"
Print L15$-"%s"-"%ld"
Every On
End Proc
Procedure _STRINGS
LHDR$=At(17,3)+Pen$(5)+"ZModem Transfer - <Esc> to Abort"
L1$=At(10,5)+Chr$(26)+Pen$(3)+" Protocol: "+Pen$(6)+D$+"%s"
L3$=At(10,6)+Chr$(26)+Pen$(3)+" File Name: "+Pen$(6)+D$+"%s"
L4$=At(10,7)+Chr$(26)+Pen$(3)+" Filesize: "+Pen$(6)+D$+"%ld"
L5$=At(10,8)+Chr$(26)+Pen$(3)+" Received bytes: "+Pen$(7)+D$+"%ld"
L6$=At(10,9)+Chr$(26)+Pen$(3)+" Blocks Rec'd: "+Pen$(7)+D$+"%ld"
L8$=At(10,10)+Chr$(26)+Pen$(3)+" Estimated time: "+Pen$(6)+D$+"%s"
L9$=At(10,11)+Chr$(26)+Pen$(3)+" Elapsed Time: "+Pen$(7)+D$+"%s"
L10$=At(10,12)+Chr$(26)+Pen$(3)+" Error Checking: "+Pen$(6)+D$+"%s"
L11$=At(10,13)+Chr$(26)+Pen$(3)+" Last error: "+Pen$(6)+D$+"%s"
L12$=At(10,14)+Chr$(26)+Pen$(3)+" Total Errors: "+Pen$(6)+D$+"%ld"
L13$=At(10,15)+Chr$(26)+Pen$(3)+" Timeouts: "+Pen$(6)+D$+"%ld"
L14$=At(10,16)+Chr$(26)+Pen$(3)+" Cps: "+Pen$(7)+D$+"%ld"
L15$=At(10,17)+Chr$(26)+Pen$(3)+" Message: "+Pen$(6)+D$+"%s"
X$= Extension_11_00C8("a",L1$,"",XCUSTOM)
X$= Extension_11_00C8("b",L3$,"",XCUSTOM)
X$= Extension_11_00C8("c",L4$,"",XCUSTOM)
X$= Extension_11_00C8("d",L15$,"",XCUSTOM)
X$= Extension_11_00C8("e",L11$,"",XCUSTOM)
X$= Extension_11_00C8("f",L12$,"",XCUSTOM)
X$= Extension_11_00C8("g",L13$,"",XCUSTOM)
X$= Extension_11_00C8("h",L6$,"",XCUSTOM)
X$= Extension_11_00C8("i",L5$,"",XCUSTOM)
X$= Extension_11_00C8("j",L8$,"",XCUSTOM)
X$= Extension_11_00C8("k",L9$,"",XCUSTOM)
X$= Extension_11_00C8("l",L10$,"",XCUSTOM)
X$= Extension_11_00C8("m",L14$,"",XCUSTOM)
' Set up string for phonebook requestor...
A$=A$+"INk 1,0,2;"
A$=A$+"SetVar 1,'TermPlay PhoneBook';"
A$=A$+"SetVar 2,'Path:';"
A$=A$+"SIze 500,200;"
A$=A$+"BAse SW SX-2/,SH SY-2/;"
A$=A$+"SAve 2;"
A$=A$+"BOx 0,0,1,SX,SY;"
A$=A$+"POutline 1VACX,10,1VA,0,14;"
A$=A$+"PRint 34,30,2VA,9;"
A$=A$+"LIne XB16+,YA4-,16,480;"
A$=A$+"EDit 1,XA8+,YA4+,46,44,3VA,5,11;"
A$=A$+"VLine 460,48,19,176;"
A$=A$+"VSlider 2,460,52,8,120,0,8,65,1;[ZC 3,ZP;]"
A$=A$+"AList 3,96,48,42,16,0VA,0,0,0,8;[ZC 4,0VA ZP AR;SV 4,ZP;]"
A$=A$+"LIne 96,180,65,476;"
A$=A$+"EDit 4,112,184,42,42,0,0,13;"
A$=A$+"BUtton 5,SX496-,SY152-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' Dial ',12;][]"
A$=A$+"BUtton 6,SX496-,SY136-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' Sort ',12;][]"
A$=A$+"BUtton 7,SX496-,SY120-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,'Delete',12;][]"
A$=A$+"BUtton 8,SX496-,SY104-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' Edit ',12;][]"
A$=A$+"BUtton 9,SX496-,SY24-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' QUIT ',12;][]"
A$=A$+"BUtton 10,SX496-,SY88-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' Save ',12;][]"
A$=A$+"BUtton 11,SX496-,SY72-,56,14,0,0,1;[UNpack 0,0,BP47+;PRint 4,4,' Load ',12;][]"
A$=A$+"EXit;"
' string for the config screen...
B$=B$+"SetVar 1,'TermPlay Configuration Screen';"
B$=B$+"SetVar 2,' Modem Speed:';"
B$=B$+"SetVar 3,' Text Mode(Y,N,?,C):';"
B$=B$+"SetVar 4,' OverWrite Files:';"
B$=B$+"SetVar 5,' Buffer Size(K):';"
B$=B$+"SetVar 6,' Max Errors:';"
B$=B$+"SetVar 7,' Auto Activate:';"
B$=B$+"SetVar 8,'Delete after Upload:';"
B$=B$+"SetVar 9,' Keep Partial Files:';"
B$=B$+"SetVar 10,' Send Full Path:';"
B$=B$+"SetVar 11,' Receive Full Path:';"
B$=B$+"SetVar 12,' DownLoad Path:';"
B$=B$+"SIze 640,200;"
B$=B$+"BAse 0,0;"
B$=B$+"SAve 2;"
B$=B$+"BOx 0,0,1,SX,SY;"
B$=B$+"POutline 320,60,1VA,0,14;"
B$=B$+"PRint 4,8,2VA,9;"
B$=B$+"LIne XB7+,YA4-,16,272;"
B$=B$+"EDit 13,XA8+,YA4+,8,7,13VA,5,11;"
B$=B$+"PRint 4,25,3VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 14,XA8+,YA4+,4,3,14VA,5,11;"
B$=B$+"PRint 4,42,4VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 15,XA8+,YA4+,4,3,15VA,5,11;"
B$=B$+"PRint 4,59,5VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 16,XA8+,YA4+,4,3,16VA,5,11;"
B$=B$+"PRint 4,76,6VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 17,XA8+,YA4+,4,3,17VA,5,11;"
B$=B$+"PRint 4,93,7VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 18,XA8+,YA4+,4,3,18VA,5,11;"
B$=B$+"PRint 4,110,8VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 19,XA8+,YA4+,4,3,19VA,5,11;"
B$=B$+"PRint 4,127,9VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 20,XA8+,YA4+,4,3,20VA,5,11;"
B$=B$+"PRint 4,144,10VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 21,XA8+,YA4+,4,3,21VA,5,11;"
B$=B$+"PRint 4,161,11VA,9;"
B$=B$+"LIne XB7+,YA4-,16,240;"
B$=B$+"EDit 22,XA8+,YA4+,4,3,22VA,5,11;"
B$=B$+"PRint 4,178,12VA,9;"
B$=B$+"LIne XB7+,YA4-,16,480;"
B$=B$+"EDit 23,XA8+,YA4+,36,35,23VA,5,11;"
B$=B$+"BUtton 24,SX240-,SY80-,76,18,0,0,1;[UNpack 0,0,BP47+;PR 4,4,'Cancel',12;][BQ;]"
B$=B$+"KY 13,0;"
B$=B$+"BUtton 25,SX140-,SY110-,56,14,0,0,1;[UNpack 0,0,BP47+;PR 4,4,'Load ',12;][BQ;]"
B$=B$+"KY 13,0;"
B$=B$+"BUtton 26,SX340-,SY110-,56,14,0,0,1;[UNpack 0,0,BP47+;PR 4,4,'Save ',12;][BQ;]"
B$=B$+"KY 13,0;"
B$=B$+"BUtton 27,SX240-,SY110-,56,14,0,0,1;[UNpack 0,0,BP47+;PR 4,4,' Use ',12;][BQ;]"
B$=B$+"KY 13,0;"
B$=B$+"RUn 0,3;"
B$=B$+"EXit;"
' string for the editing requestor...
C$=C$+"SetVar 1,'Edit a Record';"
C$=C$+"SetVar 2,' Enter name:';"
C$=C$+"SetVar 3,'Enter Phone #:';"
C$=C$+"SIze 420,100;"
C$=C$+"BAse SW SX-2/,SH SY-2/;"
C$=C$+"SAve 2;"
C$=C$+"BOx 0,0,1,SX,SY;"
C$=C$+"POutline 1VACX,10,1VA,0,14;"
C$=C$+"PRint 24,32,2VA,9;"
C$=C$+"LIne XB7+,YA4-,16,352;"
C$=C$+"EDit 1,XA8+,YA4+,22,22,4VA,5,11;"
C$=C$+"PRint 24,52,3VA,9;"
C$=C$+"LIne XB7+,YA4-,16,352;"
C$=C$+"EDit 2,XA8+,YA4+,22,22,5VA,5,11;"
C$=C$+"BUtton 0,SX230-,SY20-,56,14,0,0,1;[UNpack 0,0,BP47+;PR 4,4,' OK',12;][BQ;]"
C$=C$+"KY 13,0;"
C$=C$+"RUn 0,3;"
C$=C$+"EXit;"
End Proc
Procedure _DOWNLOAD
Every Off
STA$= Extension_11_00C8("","","xprzmodem.library",XOPEN) : Rem open
If STA$<>"OK"
Print "Failed to open xprzmodem.library!"
Shoot : Wait 60
Extension_11_0024
End
End If
If Upper$(Left$(ST$(3),1))="Y" : TMX$="TY"
Else If Upper$(Left$(ST$(3),1))="N" : TMX$="TN"
Else If Upper$(Left$(ST$(3),1))="?" : TMX$="T?"
Else TMX$="TC"
End If
If Upper$(Left$(ST$(4),1))="Y" : OWX$="OY"
Else If Upper$(Left$(ST$(4),1))="S" : OWX$="OS"
Else If Upper$(Left$(ST$(4),1))="R" : OWX$="OR"
Else OWX$="ON"
End If
BFX$="B"+ST$(5)
ERX$="E"+ST$(6)
If Upper$(Left$(ST$(7),1))="Y"
AAX$="AY"
Else
AAX$="AN"
End If
If Upper$(Left$(ST$(8),1))="Y"
DAX$="DY"
Else
DAX$="DN"
End If
If Upper$(Left$(ST$(9),1))="Y"
KPX$="KY"
Else
KPX$="KN"
End If
If Upper$(Left$(ST$(10),1))="Y"
SFX$="SY"
Else
SFX$="SN"
End If
If Upper$(Left$(ST$(11),1))="Y"
RFX$="RY"
Else
RFX$="RN"
End If
DPX$="P"+ST$(12)
SET$="Z1"+","+TMX$+","+OWX$+","+BFX$+","+ERX$+","+AAX$+","+DAX$+","+KPX$+","+SFX$+","+RFX$+","+DPX$
SET$=SET$+Chr$(0)
STA$= Extension_11_00C8("",SET$,"",XSETUP) : Rem SETUP
STATUS=Val(Mid$(STA$,1,1)) : Rem All OK?
FREQDL=Val(Mid$(STA$,2,1)) : Rem Need Freq for DL?
FREQUL=Val(Mid$(STA$,3,1)) : Rem Need Freq for UL?
If STATUS=0
Print "Failed to setup parameters for library..."
DUM$= Extension_11_00C8("","","",XCLOSE)
Wait Key : Pop Proc
End If
Clw
L$=At(10,13)+Chr$(26)+Pen$(3)+" Last error: "+Pen$(6)+D$+"<none>"
Print L$
STA$= Extension_11_00C8("","","",XREC)
Bell : Print : Cls 0
STA$= Extension_11_00C8("","","",XCLOSE)
Every 60 Proc DA_TIME : Every On
End Proc
Procedure _UPLOAD
Every Off
STA$= Extension_11_00C8("","","xprzmodem.library",XOPEN) : Rem open
If STA$<>"OK"
Print "Failed to open xprzmodem.library!"
Shoot : Wait 60
Extension_11_0024
End
End If
If Upper$(Left$(ST$(3),1))="Y" : TMX$="TY"
Else If Upper$(Left$(ST$(3),1))="N" : TMX$="TN"
Else If Upper$(Left$(ST$(3),1))="?" : TMX$="T?"
Else TMX$="TC"
End If
If Upper$(Left$(ST$(4),1))="Y" : OWX$="OY"
Else If Upper$(Left$(ST$(4),1))="S" : OWX$="OS"
Else If Upper$(Left$(ST$(4),1))="R" : OWX$="OR"
Else OWX$="ON"
End If
BFX$="B"+ST$(5)
ERX$="E"+ST$(6)
If Upper$(Left$(ST$(7),1))="Y"
AAX$="AY"
Else
AAX$="AN"
End If
If Upper$(Left$(ST$(8),1))="Y"
DAX$="DY"
Else
DAX$="DN"
End If
If Upper$(Left$(ST$(9),1))="Y"
KPX$="KY"
Else
KPX$="KN"
End If
If Upper$(Left$(ST$(10),1))="Y"
SFX$="SY"
Else
SFX$="SN"
End If
If Upper$(Left$(ST$(11),1))="Y"
RFX$="RY"
Else
RFX$="RN"
End If
DPX$="P"+ST$(12)
SET$="Z1"+","+TMX$+","+OWX$+","+BFX$+","+ERX$+","+AAX$+","+DAX$+","+KPX$+","+SFX$+","+RFX$+","+DPX$
SET$=SET$+Chr$(0)
STA$= Extension_11_00C8("",SET$,"",XSETUP) : Rem SETUP
STATUS=Val(Mid$(STA$,1,1)) : Rem All OK?
If STATUS=0
Print "Failed to setup parameters for library..."
DUM$= Extension_11_00C8("","","",XCLOSE)
Pop Proc
End If
Clw
_FILE$=Fsel$("","","Choose a File to UpLoad")
If _FILE$="" Then Goto DA_END
_FILE$=_FILE$+Chr$(0)
LST$=At(10,13)+Chr$(26)+Pen$(3)+" Last error: "+Pen$(6)+D$+"<none>"
TX$= Extension_11_00C8(_FILE$,"","",XSEND)
DA_END:
Bell : Print
TX$= Extension_11_00C8("","","",XCLOSE)
Every 60 Proc DA_TIME : Every On
End Proc